#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
#include<assert.h>
#if 0
int main()
{
	char arr1[] = "abq";
	char arr2[] = "abcdef";
	int ret = strcmp(arr1, arr2);
	printf("%d\n", ret);
	return 0;
}
#endif
int my_strcmp(const char*str1,const char*str2)
{
	assert(str1 && str2);
	while (*str1 == *str2)
	{
		if (*str1 == '\0')
			return 0;
		str1++;
		str2++;
	}
	//if (*str1 > *str2)
		//return 1;
	//else
        //return -1;
	return *str1 - *str2;
}
int main()
{
	char arr1[] = "abq";
	char arr2[] = "abcdef";
	int ret = my_strcmp(arr1, arr2);
	printf("%d\n", ret);
	return 0;
}